package com.cqjtu.tto.controller;

import cn.dev33.satoken.annotation.SaCheckLogin;
import cn.dev33.satoken.annotation.SaCheckRole;
import com.cqjtu.tto.service.RegisterService;
import com.cqjtu.tto.vo.Results;
import com.cqjtu.tto.vo.params.RegisterParam;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 *@author：monkey-L
 *@description: 用户注册控制器
 *@date: 21:10 2021/12/8
*/
@RestController
@Api(tags = "注册模块")
public class RegisterController {

    @Autowired
    private RegisterService registerService;

//    @SaCheckRole("admin")
//    @SaCheckLogin
    @PostMapping("register")
    @ApiOperation(value = "用户注册")
    public Results register(@RequestBody RegisterParam registerParam) {
        return registerService.register(registerParam);
    }
}
